package gui;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import restaurant.TestGui;


public class Gui extends JFrame implements Runnable {
	
	private JPanel contentPane;
	private static Login login;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		TestGui test = new TestGui();
		Gui frame = new Gui();
		Thread t = new Thread(frame);
		t.start();
	}

	/**
	 * Create the frame.
	 */
	public Gui() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 850, 500);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
	}

	@Override
	public void run() {
		setVisible(false);
		login = new Login(this);
		callLogin();
		
	}
	
	/**
	 * CallLogin:
	 * 
	 * Static method for calling the login window
	 */
	public static void callLogin(){
		
		login.setVisible(true);
	}

}
